/** initialize css counter */
#write div.md-toc {
    counter-reset: tocH2Counter;
}

span.md-toc-h2 {
    counter-reset: tocH3Counter;
}

span.md-toc-h3 {
    counter-reset: tocH4Counter;
}

span.md-toc-h4 {
    counter-reset: tocH5Counter;
}

span.md-toc-h5 {
    counter-reset: tocH6Counter;
}

#write span.md-toc-h2 .md-toc-inner::before {
    counter-increment: tocH2Counter;
    content: counter(tocH2Counter) ".";
    color: var(--counter-color);
    font-size: 1.3em;
}

#write span.md-toc-h3 .md-toc-inner::before {
    counter-increment: tocH3Counter;
    content: counter(tocH2Counter) "." counter(tocH3Counter) ".";
    color: var(--counter-color);
    font-size: 1.3em;
}

#write span.md-toc-h4 .md-toc-inner::before {
    counter-increment: tocH4Counter;
    content: counter(tocH2Counter) "." counter(tocH3Counter) "." counter(tocH4Counter) ".";
    color: var(--counter-color);
    font-size: 1.3em;
}

#write span.md-toc-h5 .md-toc-inner::before {
    counter-increment: tocH5Counter;
    content: counter(tocH2Counter) "." counter(tocH3Counter) "." counter(tocH4Counter) "." counter(tocH5Counter) ".";
    color: var(--counter-color);
    font-size: 1.3em;
}

#write span.md-toc-h6 .md-toc-inner::before {
    counter-increment: tocH6Counter;
    content: counter(tocH2Counter) "." counter(tocH3Counter) "." counter(tocH4Counter) "." counter(tocH5Counter) "." counter(tocH6Counter) ".";
    color: var(--counter-color);
    font-size: 1.3em;
}